<div id="products_cat" class="span-17">
	<h1>
		<?php echo Yii::t('msg', 'Product Categories');?>
		<?php if(isset($model->name)) {
				echo ' >> ';
				echo $model->name;
		}?>
	</h1>
<?php  foreach($modelsList as $model) { ?>
	<?php if ($model->subProductCategoriesCount==0) { ?>
			<li>
				<?php echo CHtml::link(CHtml::image($model->photo_path), array(Yii::app()->language.'/products/index/'. $model->slug));?>
				<p><?php echo CHtml::link($model->name, array(Yii::app()->language.'/products/index/'. $model->slug));?></p>
			</li> 
		<?php }else { ?>
			<li>
				<?php echo CHtml::link(CHtml::image($model->photo_path), array(Yii::app()->language.'/productCategories/index/'. $model->slug));?>
				<p><?php echo CHtml::link($model->name, array(Yii::app()->language.'/productCategories/index/'. $model->slug));?></p>
			</li> 
	<?php } ?>
<?php } ?>

</div>
<div id="products_menu" class="span-6 last">
<h2><?php echo Yii::t('msg', 'Our Products');?></h2>
	<?php foreach($menusList as $model) { ?>
		<?php if ($model->subProductCategoriesCount==0) { ?>
			<h3><?php echo CHtml::link($model->name, array(Yii::app()->language.'/products/index/'. $model->slug));?></h3>
		<?php }else { ?>
			<h3><?php echo $model->name;?></h3>
		<?php }?>
			<?php if ($model->subProductCategoriesCount>0) {
				foreach ($model->subProductCategories as $sub) {
			?>
			<li><?php echo CHtml::link($sub->name, array(Yii::app()->language.'/products/index/'. $sub->slug));?></li>
      <?php 
      	}
			}
		}
	?>
</div>
